/**
 * 任务相关类型定义
 */

/**
 * 总表文件信息
 */
export interface SourceFile {
	id: number
	file_name: string
	file_state: number
}

/**
 * 目标文件信息
 */
export interface TargetFile {
	file_name: string
}

/**
 * 任务行数据
 */
export interface TaskRow {
	isCheckLoading?: boolean
	isStopLoading?: boolean
	isDownloadLoading?: boolean
	id: number
	task_id: number
	task_name: string
	task_state: number
	file_download_count?: number
	download_url?: string
	source_file?: SourceFile
	target_file?: TargetFile
	created_uid?: number
	created_at?: string
	source_file_state?: number
	source_file_original_name?: string
	source_file_remark?: string
	task_remark?: string
	process?: number
	source_file_id: number
}

/**
 * API 响应数据结构
 */
export interface ApiResponse<T = any> {
	code: number
	data: T
	message: string
}

/**
 * CatchTable 组件引用类型
 */
export interface CatchTableInstance {
	tableData: TaskRow[]
	doSearch: () => void
	openDialog: (v: any, dialogTitle?: string) => void,
	del: (api: string, id: any) => void
}

